
package samples;
// {{{ imports
import jp.ize.ux.UXRoot;
import jp.ize.ux.UXObject;
import jp.ize.ux.events.UXMouseEvent;
import jp.ize.ux.geom.UXSize;
import jp.ize.ux.geom.UXRect;
import jp.ize.ux.geom.UXPoint;
import jp.ize.ux.components.UXImage;
import jp.ize.ux.components.UXLinearBox;
import jp.ize.ux.acts.Act;
import jp.ize.ux.acts.LinearAct;
import jp.ize.ux.tween.easings.Expo;

import jp.ize.iwp.RuntimeEngine;
import jp.ize.iwp.utils.DebugUtil;
// }}}
// {{{ class LinearBox2
class LinearBox2
{
	// {{{ public static function main()

	public static function main()
	{
		RuntimeEngine.init();
		DebugUtil.init();
		DebugUtil.setLocation( 200, 300 );
		// {{{ ex.2 move
		var lineb = new UXLinearBox(new UXPoint(50,10), new UXPoint(700,200));
		// LinearMoveのインタラクションをMouseDownで起こすことにする。
		lineb.ctrl.getInteraction("Move").addReactEvent(UXMouseEvent.DOWN);
		var param = {
			time: 0.3,
			transition:Expo.easeOut,
			delta:2
		};
		lineb.ctrl.getInteraction("Move").addAct((new LinearAct()).move(param));
		// LinearFishEyeのインタラクションをMouseOverで起こすことにする。
		lineb.x = 50;
		lineb.y = 100;
		lineb.addUXChild(new UXImage("Pref.png"));
		lineb.addUXChild(new UXImage("lambda-icon.png", new UXSize(100,100)));
		lineb.addUXChild(new UXImage("Safari.png"));
		lineb.addUXChild(new UXImage("ImageCapture.png"));
		lineb.addUXChild(new UXImage("TimeMachine.png"));
		lineb.addUXChild(new UXImage("iPhoto.png"));
		lineb.addUXChild(new UXImage("iTunes.png"));
		lineb.addUXChild(new UXImage("mail.png"));
		lineb.addUXChild(new UXImage("robot.png"));		
		UXRoot.addUXChild(lineb);
		lineb.ctrl.trigger("Layout");
		// }}}
	}

	// }}}
}
// }}}
